<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<%@page import="java.util.*"%>
<%@page import="domain.*"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>PerSel | Resultado Busqueda</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	
	<!-- Stylesheets -->
	<link rel="stylesheet" href="css/reset.css" />
	<link rel="stylesheet" href="css/styles.css" />
	<link rel="stylesheet" href="css/input.css" />

	<script type="text/javascript" src="js/jquery-1.4.2.js"></script>
<script type="text/javascript" src="js/input.js"></script>
	<!-- Scripts -->
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
</head>

<body>

	<div id="wrapper" class="container_12 clearfix">		
		
		<!-- Text Logo -->
		<h1 id="logo" class="grid_4"><a href="index.jsp">PelSer</a></h1>
        <div>
        <!-- Navigation Menu -->
        <ul id="navigation" class="grid_8">
            <li><a href="films.jsp"><span class="meta">Tus Peliculas</span><br />Top</a></li>
            <li><a href="messages.html"><span class="meta">Tus mensajes</span><br />Mensajes</a></li>
            <li><a href="friends.jsp"><span class="meta">Tus Amigos</span><br />Amigos</a></li>
            <li><a href="profile.jsp"><span class="meta">Tu perfil</span><br />Perfil</a></li>
            <li><a href="wall.jsp"><span class="meta">Novedades</span><br />Muro</a></li>
        </ul></div><div>
        	<table width="100%">
        	<tr>
        		<td>
        		<form action="FrontControllerSearch" method="post">
        		<label class="input">
    			<span>Buscar...</span>
    			<input type="text"  name="busquedaSimple"/>
				</label>
        		<input type="hidden" name="rdtema" value="buscarSimple"/>
				<a href="search.jsp">Busqueda Avanzada</a>
				</form>
				</td>
        	 	
        	 	<% if(session.getAttribute("session.user")!=null){
        	 		User usuario= (User)(session.getAttribute("session.user"));
        	 		
        	 	%>
        	 	
        	 	<td align="right">
        	 	<form action="FrontControllerLogin?accion=logout" method="post">
        	 	<input type="image" title="Salir" src="images/logout.gif" ondblclick="this.form.submit()"></input>
        	 	</form>
        	 	 
        	 	<% 
        	 	out.print("<i>Bienvenid@: <b>"+usuario.getName()+" "+usuario.getSurname()+"</b></i>");
        	 	
        	 	} %>
        	 	
        	 	</td>
        	</tr>
        	</table>
        </div>
		
		<div class="hr grid_12 clearfix"></div>
			
		<!-- Caption Line -->
		<h2 class="grid_12 caption clearfix">Resultado de busqueda de personas</h2>
		
		<div class="hr grid_12 clearfix"></div>
		
		<!-- Column 1 /Content -->
		<div class="grid_12" align="center">
			
			<!-- Blog Post -->
			
			<ul class="message">
			<h4>
				<%List<User> resultado = new LinkedList<User>();
				if(request.getAttribute("resultado") instanceof List<?>)
				{
					resultado=(List<User>)request.getAttribute("resultado");
				}
				for(User u:resultado)
				{%>
					<li><a href="friendProfile.jsp?idUser=<%out.print(u.getIdUser()); %>"><%=u.getName()+" "+u.getSurname()%></a></li>
				<%}	%>
			</h4>	
			</ul>
			
			<!-- Blog Navigation -->
			
		</div>
		
		<!-- Column 2 / Sidebar -->
		
		<div class="hr grid_12 clearfix">&nbsp;</div>
		
		<!-- Footer -->
		<p class="grid_12 footer clearfix">
			<span class="float"><b>&copy; Copyright</b> <a href="">Grupo 12</a></span>
			<a class="float right" href="#">Subir</a>
		</p>
		
	</div><!--end wrapper-->

</body>
</html>
